package com.it.tydic.estate.module.model.inner;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.persistence.*;

@Table(name = "tb_resource")
public class TbResource {
    /**
     * 资源ID
     */
    @Id
    @Column(name = "RESOURCE_ID")
    private String resourceId;

    /**
     * 资源名称
     */
    @Column(name = "RESOURCE_NAME")
    private String resourceName;

    /**
     * 资源路径
     */
    @Column(name = "RESOURCE_URL")
    private String resourceUrl;

    /**
     * 资源图标
     */
    @Column(name = "RESOURCE_FLAG")
    private String resourceFlag;

    /**
     * 创建用户
     */
    @Column(name = "CREATE_USER")
    private String createUser;

    /**
     * 创建时间
     */
    @Column(name = "CREATE_TIME")
    private Date createTime;

    /**
     * 节点ID
     */
    @Column(name = "PARENT_ID")
    private String parentId;

    @Column(name = "STATUS")
    private Integer status;

    @Column(name = "UPDATE_TIME")
    private Date updateTime;

    @Column(name = "UPDATE_USER")
    private String updateUser;

    @Column(name = "RESOURCE_ORDER")
    private Integer resourceOrder;

    /**
     * 获取资源ID
     *
     * @return RESOURCE_ID - 资源ID
     */
    public String getResourceId() {
        return resourceId;
    }

    /**
     * 设置资源ID
     *
     * @param resourceId 资源ID
     */
    public void setResourceId(String resourceId) {
        this.resourceId = resourceId;
    }

    /**
     * 获取资源名称
     *
     * @return RESOURCE_NAME - 资源名称
     */
    public String getResourceName() {
        return resourceName;
    }

    /**
     * 设置资源名称
     *
     * @param resourceName 资源名称
     */
    public void setResourceName(String resourceName) {
        this.resourceName = resourceName;
    }

    /**
     * 获取资源路径
     *
     * @return RESOURCE_URL - 资源路径
     */
    public String getResourceUrl() {
        return resourceUrl;
    }

    /**
     * 设置资源路径
     *
     * @param resourceUrl 资源路径
     */
    public void setResourceUrl(String resourceUrl) {
        this.resourceUrl = resourceUrl;
    }

    /**
     * 获取资源图标
     *
     * @return RESOURCE_FLAG - 资源图标
     */
    public String getResourceFlag() {
        return resourceFlag;
    }

    /**
     * 设置资源图标
     *
     * @param resourceFlag 资源图标
     */
    public void setResourceFlag(String resourceFlag) {
        this.resourceFlag = resourceFlag;
    }

    /**
     * 获取创建用户
     *
     * @return CREATE_USER - 创建用户
     */
    public String getCreateUser() {
        return createUser;
    }

    /**
     * 设置创建用户
     *
     * @param createUser 创建用户
     */
    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }

    /**
     * 获取创建时间
     *
     * @return CREATE_TIME - 创建时间
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 设置创建时间
     *
     * @param createTime 创建时间
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 获取节点ID
     *
     * @return PARENT_ID - 节点ID
     */
    public String getParentId() {
        return parentId;
    }

    /**
     * 设置节点ID
     *
     * @param parentId 节点ID
     */
    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    /**
     * @return STATUS
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * @param status
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    /**
     * @return UPDATE_TIME
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * @param updateTime
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * @return UPDATE_USER
     */
    public String getUpdateUser() {
        return updateUser;
    }

    /**
     * @param updateUser
     */
    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser;
    }

    /**
     * @return RESOURCE_ORDER
     */
    public Integer getResourceOrder() {
        return resourceOrder;
    }

    /**
     * @param resourceOrder
     */
    public void setResourceOrder(Integer resourceOrder) {
        this.resourceOrder = resourceOrder;
    }

    @Transient
    private List<TbResource> children=new ArrayList<>();


    public List<TbResource> getChildren() {
        return children;
    }

    public void setChildren(List<TbResource> children) {
        this.children = children;
    }
}